mouse messages
Mouse messages contain the grid number of the grid the message is prepared for and has mouse focus. When no mouse buttons are down, the grid that contains the mouse cursor is also the mouse focus grid. When a mouse button is depressed when none are currently down, the grid that contains the mouse cursor automatically grabs mouse focus and holds it until all mouse buttons are released, at which time mouse focus goes to the grid that contains the mouse cursor. Mouse messages are normally routed to the grid with mouse focus, but MouseExit and MouseEnter messages may be generated for other grids as the mouse cursor moves from grid to grid while mouse focus is grabbed.

  arguments v0,v1,v2,v3,r0,r1 contain x,y,state,time,0,grid.

x, y
x,y contain the position of the mouse cursor in the local coordinates of focusGrid at the time the mouse event was detected.

x,y may indicate a mouse cursor position outside grid and/or focusGrid if mouse focus has been grabbed by focusGrid.

state
Bit 00 - 03 : Button # causing event (MouseDown and MouseUp only )
Bit 04 - 06 : # of clicks (MouseDown only)
Bit 07 : 1 if grid has mouse focus
Bit 08 - 15 : Reserved
Bit 16 - 23 : Keyboard "mode" keys (16=Shift, 17=Control, 18=Alt)
Bit 24 - 31 : Up/Down image of up to 8 mouse buttons (1 = down)

Bit 00 - 03 : Button #: None=0 : Left=1 : Center=2 : Right=3...
Bit 16 = 1 : Shift key is down
Bit 17 = 1 : Control key is down
Bit 18 = 1 : Alt key is down
Bit 24 = 1 : Left button is down
Bit 25 = 1 : Center button is down
Bit 26 = 1 : Right button is down
Bit 27 - 31 : Other buttons down (assignments not guaranteed)

time
time contains the system millisecond time that the keyboard event was detected.  time is not related to time of day. It is simply a free running millisecond timer that computer systems usually initialize to zero when they are started.